package com.easepal802s.project.utils;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.easepal7506a.project.ui.activity.HomeActivity7506;
import com.easepal802s.project.ui.activity.AdvancedMassageActivity;
import com.easepal802s.project.ui.activity.AttitudeAdjustmentActivity;
import com.easepal802s.project.ui.activity.BaseMvpTestActivity;
import com.easepal802s.project.ui.activity.ChooseActivity;
import com.easepal802s.project.ui.activity.HomeActivity;
import com.easepal802s.project.ui.activity.MusicActivity;
import com.easepal802s.project.ui.activity.ProMasDetailActivity;
import com.easepal802s.project.ui.activity.ProfessionalMassageActivity;
import com.easepal802s.project.ui.activity.ScanShoulderActivity;
import com.easepal802s.project.ui.activity.ShouldersAdjustmentActivity;
import com.easepal802s.project.ui.activity.WebViewActivity;


/**
 * Created by FHB on 2018/3/26.
 */

public class ActivityUtils {
    public static void startHomeActivity(Context mContext,String isBreak){
        Intent intent = new Intent(mContext, HomeActivity.class);
        Log.e("startHomeActivity",isBreak+"");
        intent.putExtra("isbreak",isBreak);
        mContext.startActivity(intent);
    }
    public static void startHome7506Activity(Context mContext,boolean is7506L){
        Intent intent = new Intent(mContext, HomeActivity7506.class);
        intent.putExtra("is7506L",is7506L);
        mContext.startActivity(intent);
    }
    public static void startWebViewActivity(Context mContext){
        Intent intent = new Intent(mContext, WebViewActivity.class);
        mContext.startActivity(intent);
    }

    public static void startChooseActivity(Context mContext){
        Intent intent = new Intent(mContext, ChooseActivity.class);

        mContext.startActivity(intent);
    }

    public static void startProfessionMassaActivity(BaseMvpTestActivity mContext){
//        if(BleController.getInst().getIsOn()){
            Intent intent = new Intent(mContext, ProfessionalMassageActivity.class);
            mContext.startActivity(intent);
//        }
//        else {
//            if(BleController.getInst().getConnectState()!=CONNECT_SUCCEED){
//                mContext.showBleList();
//            }else {
//                BleController.getInst().sendSingleData(BleConstant.TURNING,true);
//            }
//
//        }

    }

    /**
     * 肩部检测
     * @param mContext
     */
    public static void startScanShoulderActivity(Context mContext){
        Intent intent = new Intent(mContext, ScanShoulderActivity.class);
        mContext.startActivity(intent);
    }


    /**
     * 肩部调整
     * @param mContext
     */
    public static void startShouldersAdjustmentActivity(Context mContext){
        Intent intent = new Intent(mContext, ShouldersAdjustmentActivity.class);

        mContext.startActivity(intent);
    }

    /**
     * 专业按摩详情
     * @param mContext
     */
    public static void startProMasDetailActivity(Context mContext,String name,String commondCode){
        Log.e("startActivity","startProMasDetailActivity");
        Intent intent = new Intent(mContext, ProMasDetailActivity.class);
        intent.putExtra("name",name);
        intent.putExtra("code",commondCode);
        mContext.startActivity(intent);
    }

    /**
     * 高级按摩
     * @param mContext
     */
    public static void startAdvancedMassageActivity(Context mContext){
        Intent intent = new Intent(mContext, AdvancedMassageActivity.class);
        mContext.startActivity(intent);
    }

    /**
     * 高级按摩  flag =“1” 按摩手法，  2 气压按摩
      * @param mContext
     */
    public static void startAdvancedMassageActivity(Context mContext,String flag){
        Log.e("startActivity","startAdvancedMassageActivity"+flag);
        Intent intent = new Intent(mContext, AdvancedMassageActivity.class);
        intent.putExtra("model",flag);
        mContext.startActivity(intent);
    }

    /**
     * 姿态调节
     * @param mContext
     */
    public static void startAttitudeAdjustmentActivity(Context mContext){
        Intent intent = new Intent(mContext, AttitudeAdjustmentActivity.class);
        mContext.startActivity(intent);
    }


     /**
      * 音捶同步
     * @param mContext
     */
    public static void startMusicActivity(Context mContext){
        Intent intent = new Intent(mContext,MusicActivity.class);
        mContext.startActivity(intent);
    }

}
